<script setup>
import Dialog from "@/components/Dialog.vue";

const props = defineProps(["visible", "title", "thead", "data"]);

const emits = defineEmits(["close"]);
</script>

<template>
  <Dialog
    :visible="props.visible"
    :title="props.title"
    @close="
      () => {
        emits('close');
      }
    "
  >
    <div class="gxp_box2">
      <div class="gxp_box2_c">
        <div class="gxp_box2_c_c">
          <div class="gxp_box2_c_c_c">
            <template v-for="(item, index) in props.thead" :key="index">
              <span
                class="size16 color13 item1"
                :class="{ width_1: index === 0 || index === 5 }"
                >{{ item }}</span
              >
            </template>
          </div>
          <div class="gxp_gd">
            <div
              class="gxp_box2_c_c_c"
              v-for="(item, index) in props.data"
              :key="index"
            >
              <div class="size16 color14 item1 width_1">{{ item?.name }}</div>
              <div class="size16 color14 item1">{{ item?.kindergarten }}</div>
              <div class="size16 color14 item1">{{ item?.primary }}</div>
              <div class="size16 color14 item1">{{ item?.junior }}</div>
              <div class="size16 color14 item1">{{ item?.senior }}</div>
              <div class="size16 color14 item1 width_1">{{ item?.vocational }}</div>
              <div class="size16 color14 item1">{{ item?.special }}</div>
              <div class="size16 color14 item1">{{ item?.specialized }}</div>
              <div class="size16 color14 item1">{{ item?.high }}</div>
              <div class="size16 color14 item1">{{ item?.student }}</div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </Dialog>
</template>

<style lang="less" scoped>
.item1 {
  width: 8%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.width_1 {
  width: 13%;
}
.gxp_box2 {
  width: 100%;
  height: 100%;
  display: flex;
  .gxp_box2_c {
    width: 100%;
    height: 100%;
    padding: 0.625rem;
    .gxp_box2_c_c {
      width: 100%;
      height: 99%;
      // overflow: auto;
      // scrollbar-width: none;
      // border: 1px red solid;
      .gxp_box2_c_c_c {
        width: 100%;
        height: 9%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 0.625rem 0 0.625rem;
        margin-bottom: 0.1rem;
        background: rgba(255, 255, 255, 0.1);
        &:first-child {
          background: none;
        }
        &:nth-child(2n) {
          background: rgba(255, 255, 255, 0.05);
        }
      }
      .gxp_gd {
        width: 100%;
        height: 94%;
        overflow: auto;
      }
    }
  }
}

.size16 {
  font-size: 1rem;
}
.size20 {
  font-size: 1.25rem;
}

.color12 {
  color: #71f1ea;
}
.color13 {
  color: #c9e9f8;
}
.color14 {
  color: #ffffff;
}

.font_family_num {
  font-family: Helvetica-Bold !important;
  font-weight: bold;
}
</style>
